package org.linlinjava.litemall.db.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.linlinjava.litemall.db.models.Cart;
import java.math.BigDecimal;
import java.util.List;

public interface CartService extends IService<Cart> {

    public Cart queryExist(Long goodsId, Long productId, Long userId) ;

    public List<Cart> queryByUid(Long userId) ;

    public List<Cart> queryByUidAndChecked(Long userId) ;

    public int delete(List<Integer> productIdList, Long userId) ;


    public Cart findById(Long userId, Long id) ;

    public int updateCheck(Long userId, List<Integer> idsList, Boolean checked) ;

    public void clearGoods(Long userId) ;
    public IPage<Cart> querySelective(Long userId, Long goodsId, Integer page, Integer limit) ;


    public boolean checkExist(Long goodsId) ;

    public void updateProduct(Long id, String goodsSn, String goodsName, BigDecimal price, String url) ;
}
